import 'package:trollee/generated/json/base/json_field.dart';
import 'package:trollee/generated/json/news_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class NewsEntity {

	int? curpage;
	int? allnum;
	List<NewsList>? newslist;

  NewsEntity();

  factory NewsEntity.fromJson(Map<String, dynamic> json) => $NewsEntityFromJson(json);

  Map<String, dynamic> toJson() => $NewsEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NewsList {

	String? id;
	String? ctime;
	String? title;
	String? description;
	@JSONField(name: "source")
	String? xSource;
	String? picUrl;
	String? url;

  NewsList();

  factory NewsList.fromJson(Map<String, dynamic> json) => $NewsListFromJson(json);

  Map<String, dynamic> toJson() => $NewsListToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
